<?
	$cachename="num";
	if(!file_exists($cachename)){
		$num=0;
		setCache($num);
	}
	$num=getCache($cachename);
	$num++;
	setCache($num);
	function setCache($num){
			//TODO: set cache implementation
			$obj = json_encode(array('value'=>$num));
			file_put_contents("num",$obj);
			return false;
		}
	function getCache($cachename){
			$obj = json_decode(file_get_contents($cachename),true); 
			return $obj['value'];
		}
	
?>